<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<div id="titulo">
		<title><ui:insert name="pageTitle">Page Title</ui:insert></title>
	</div>
	<h:outputStylesheet library="css" name="estilo.css"></h:outputStylesheet>
	<h:outputScript library="javascript" name="scripts.js"></h:outputScript>
</h:head>
<h:body>
	<p:layout fullPage="true">
		<p:layoutUnit position="north" size="22%">
			<ui:insert name="pageHeader">Page Header</ui:insert>
		</p:layoutUnit>
		<p:layoutUnit position="west" size="18%" styleClass="fundoAzul"
			id="formEsquerdaTemplate">
			<h:form>
				<p:outputLabel
					value="Ola, #{beanUsuario.usuario.nome}, seja bem vindo!" />
				<p:panelMenu>
					<p:submenu label="Clientes" styleClass="fundoBranco">
						<p:menuitem value="Cadastrar" action="#{beanCliente.formCliente}"
							immediate="true" />
						<p:menuitem value="Listar"
							action="#{beanCliente.formListaCliente}" immediate="true" />
					</p:submenu>
					<p:submenu label="Produtos" styleClass="fundoBranco">
						<p:menuitem value="Cadastrar" action="#{beanProduto.formProduto}"
							immediate="true" />
						<p:menuitem value="Listar"
							action="#{beanProduto.formListaProduto}" immediate="true" />
						<p:menuitem value="Produtos mais vendidos"
							action="#{beanProduto.formListaProdutosMaisVendidos}"
							immediate="true" />
					</p:submenu>
					<p:submenu label="Vendas" styleClass="fundoBranco">
						<p:menuitem value="Registrar venda"
							action="#{beanVenda.formVenda}" immediate="true" />
						<p:menuitem value="Buscar vendas"
							action="#{beanVenda.formListaVenda}" immediate="true" />
						<p:menuitem value="Cancelar venda"
							action="#{beanVenda.formCancelarVenda}" immediate="true" />
					</p:submenu>
					<p:submenu label="Outros" styleClass="fundoBranco">
						<p:menuitem value="Logoff" action="#{beanUsuario.logof}"
							onclick="window.location='../index.jsp'" />
					</p:submenu>
				</p:panelMenu>
			</h:form>
		</p:layoutUnit>
		<p:layoutUnit position="center">
			<p:messages id="growl" showDetail="true" sticky="true" />
			<ui:insert name="body">Page Body</ui:insert>
		</p:layoutUnit>
		<p:layoutUnit position="south" size="6%">
			<div id="footer">
				<ui:insert name="footer">Sistema de vendas - SysVendas 2.0 - BMSoluções</ui:insert>
			</div>
		</p:layoutUnit>
	</p:layout>
</h:body>
</html>